|
|
I up-voted because I see no reason to down-vote this.
No. How would that work? Google drive stores files so if that is what you want to do, then yes it can work. But file storage and databases are 2 different things, although you can use a database to store files. But you cannot use file storage as a database.
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
In a roundabout way, yes. I have done this by using XML to LINQ. Basically, you store your tables as xml files and query them with LINQ.
"Go forth into the source" - Neal Morse
|
|
|
|
|
I had this code to generate a property.
var workspace = new AdhocWorkspace();
var generator = SyntaxGenerator.GetGenerator(workspace, LanguageNames.CSharp);
var myProperty = generator.PropertyDeclaration("MyProperty", generator.TypeExpression(SpecialType.System_Int32), Accessibility.Public);
The generated code is:
public int MyProperty
{
get
{
}
set
{
}
}
But I wanna to generate the property like this:
public int MyProperty { get; set; }
How?
Danke
|
|
|
|
|
According to this blog post:
Code Generation with Roslyn – Fields and Properties – Dogs Chasing Squirrels[^]
you need to add accessors to the property:
using SF = Microsoft.CodeAnalysis.CSharp.SyntaxFactory;
...
var myProperty = generator
.PropertyDeclaration("MyProperty", generator.TypeExpression(SpecialType.System_Int32), Accessibility.Public)
.AddAccessorListAccessors(SF.AccessorDeclaration(SyntaxKind.GetAccessorDeclaration).WithSemicolonToken(SF.Token(SyntaxKind.SemicolonToken)))
.AddAccessorListAccessors(SF.AccessorDeclaration(SyntaxKind.SetAccessorDeclaration).WithSemicolonToken(SF.Token(SyntaxKind.SemicolonToken)));
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Great it work so fine.
There must be a way to format the generated code?
The code was generated like this:
public int MyProperty
{
get;
set;
}
There a way to format it to a one line like this:
public int MyProperty { get; set; }
Danke
|
|
|
|
|
|
|
|
Please what?
1. It is very rude to ask a group of volunteers to do all of your work for you and you cannot even be bothered to spell out a single word. Very rude!
2. There are more than 1 million ways of doing this and not a single one of them will be plug-n-play for you so there is no point in googling for you.
3. Get started and when you get stuck on something specific, please come back and we'll gladly help you.
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
How to get all types of .Net applicatins hosted in a server?
|
|
|
|
|
I'm sorry but your question could mean several things. Could you explain, in more detail, what you mean?
This space for rent
|
|
|
|
|
Need a logic to get all the application (web/windows/console) details (Application name) hosted in a server.
|
|
|
|
|
Not all applications 'register' their presence on a server, so unless you know where the assemblies are located you won't find them.
I'd be assuming that you're talking about a web-server. Go to IIS to see what applications are running.
Getting 'all types' of a running windows-application is hard; you'd typically run the app and dump all loaded references (and thus, types), and there is the weak point - that only applies to loaded assemblies, not the ones that are loaded by hand (or not loaded because the environment did not need it yet).
What are you trying to do? Make a list of all applications installed on a computer?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Yes, I want to get the list of all .Net applications(Web/Windows) installed on a computer?
|
|
|
|
|
|
Without having admin privileges on a box, you can't. You will only be able to identify the applications that are registered, or that you can search in public folders for. There will be many directories that you won't be able to access.
This space for rent
|
|
|
|
|
Not possible.
You can get a list of applications currently in memory using the Task Manager. You can see applications running under other contexts using the SysInternals Process Explorer.
You can't magically know what unloaded code will use as a runtime without actually examining it. That's like shaking a box at Christmas and trying to figure out exactly which GI Joe action figure grandma got you.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
There are third party utilities that you can use to inventory your system, but as others have pointed out there are limitations. And this is the type of thing you'll want to buy instead of trying to write yourself.
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Hello...I am doing my project on Speech to text conversion.Can i do it by .Net .Can someone guide me how to begin it.What i need to learn for this.
|
|
|
|
|
Why don't you Google for ".net speech to text" and start reading?
|
|
|
|
|
Member 12967384 wrote: Can someone guide me how to begin it.What i need to learn for this. There's an article here on this site, named "C# Speech to Text" that could be interesting. The subject is also documented on MSDN, along with the classes and namespaces you need.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Member 12967384 wrote: What i need to learn for this .Net of course.
How to do some research like feeding ".net speech to text" into a search engine of your choice.
Selecting an API that fullfills your requirements.
Reading the API documentation and tutorials.
Becoming familiar with the API (e.g. by using example code).
|
|
|
|
|
Hi,
I am writing an application for Windows Service, I want to run this Service for every 1 minutes, the Windows Service does call some database objects and performs operations, this is fine up to here. But my question is what if the first cycle of Windows Service didn't complete its operations and if second cycle starts, doesn't this interference can cause Service to fail.
Similar type of question I have for the Windows Scheduler too, what if the first cycle of Windows Schedule hasn't completed yet and as per timing if 2nd Scheduler cycle tries to run the same application, isn't it going to interfere and created Problems.
Any help a code snippet, a link or a suggestion is going to help me a lot, thanks in advance.
Thanks,
Abdul Aleem
"There is already enough hatred in the world lets spread love, compassion and affection."
|
|
|
|
|
Why not just code the service to do its own timing internally? That way you can prevent a new cycle from starting if a previous one has not completed.
|
|
|
|